package com.tricode.ile.training.task.ESAD.two;

/**
 * Point out and remove the code smells in the code below (this example is adapted from the one contributed by Carol):
 */
public abstract class Account {
    private double balance;

    public Account(double balance) {
        this.balance = balance;
    }

    public abstract double calcInterest();

    public double getInterestRate() { // Some method;
        return balance;
    }
}

class SavingsAccount extends Account {

    public SavingsAccount(double balance) {
        super(balance);
    }

    public double calcInterest () {
        return 0.0;
    }

}

class CheckingAccount extends Account {

    public CheckingAccount(double balance) {
        super(balance);
    }

    public double calcInterest () {
        return 0.0;
    }

}

class FixedAccount extends Account {

    public FixedAccount(double balance) {
        super(balance);
    }

    public double calcInterest () {
        return 0.0;
    }
}
